﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
using wangyaxin.IWang;
using wangyaxin.Models;

namespace wangyaxin.Wang
{
    [ApiExplorerSettings(GroupName = "王亚鑫")]
    public class WangDapperAppService:ApplicationService,IWangDapperAppService
    {
        private readonly IRepository<WangModel> _repository;
        private readonly IWangDapperRepository _wangDapperRepository;

        public WangDapperAppService(IRepository<WangModel> repository,IWangDapperRepository wangDapperRepository)
        {
            _repository = repository;
            _wangDapperRepository = wangDapperRepository;
        }

       
        public async Task<int> Delete()
        {
            var result = await _wangDapperRepository.Delete(1);
            return result;
        }

        public async Task<string> GetWangNameAsync()
        {
            var result=await _wangDapperRepository.GetWangName();
            return result;
        }



        
    }
}
